package com.agileboot.attendance.domain.settlement.entity;

import com.agileboot.common.core.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 结算单明细实体
 */
@Data
@TableName("att_settlement_detail")
public class AttSettlementDetailEntity extends BaseEntity<AttSettlementDetailEntity> {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 结算单ID
     */
    private Long settlementId;

    /**
     * 人员ID
     */
    private Long personnelId;

    /**
     * 人员姓名
     */
    @TableField(exist = false)
    private String personnelName;

    /**
     * 出勤天数
     */
    @TableField("work_days")
    private Integer attendanceDays;

    /**
     * 加班时长（小时）
     */
    private BigDecimal overtimeHours;

    /**
     * 月薪
     */
    private BigDecimal monthlyRate;

    /**
     * 日薪
     */
    private BigDecimal dailyRate;

    /**
     * 加班费率
     */
    private BigDecimal overtimeRate;

    /**
     * 结算总金额
     */
    @TableField("amount")
    private BigDecimal totalAmount;

    /**
     * 出勤金额
     */
    @TableField(exist = false)
    private BigDecimal attendanceAmount;

    /**
     * 加班金额
     */
    @TableField(exist = false)
    private BigDecimal overtimeAmount;

    /**
     * 备注
     */
    @TableField(exist = false)
    private String remark;
}
